<template>
  <el-button
    v-for="item,index in btnArr"
    :key=index
    @click="jump(item.path)"
  >{{ item.name }}</el-button>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = useRouter();

const jump = (path) => {
  router.push(path);
};

const btnArr = router
  .getRoutes()
  .filter((route) => !["/", "/home"].includes(route.path));
</script>

<style>
</style>